//
//  QYGNetRequestModel.h
//  wawaji_ios
//
//  Created by 云+物娱 on 2017/12/7.
//  Copyright © 2017年 yiguo qi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NetRequestClass.h"

@class QYGMachineItemModel;
@class QYGGameMessageModel;
@class QYGGameResultModel;
@class QYGUserInfoModel;
@class QYGPaymentModel;
@class QYGConfigModel;
@class QYGPreparamModel;

typedef enum : NSUInteger {
    RoomActionTypeEnter,
    RoomActionTypeExit,
} RoomActionType;

@interface QYGNetRequestModel : NSObject
/*
 * 账号登录
 */
+ (void)postLoginWithAccountUserName:(NSString *)username
                            password:(NSString *)password
                           Completed:(void (^)(QYGUserInfoModel *userInfo))completed
                  WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  进入、退出房间
 */
+ (void)postEnterOrExitRoomWithDeviceId:(NSInteger)deviceId
                                 Action:(RoomActionType)roomActionType
                              completed:(void (^)(BOOL isSuccess))completed
                     WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 获取配置信息
 */
+ (void)getConfigCompleted:(void (^)(QYGConfigModel *configDict))completed
              WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  交易单号查询
 */
+ (void)getCheckPaymentWithPay_id:(NSInteger)pay_id
                        completed:(void (^)(QYGPaymentModel *paymentModel))completed
               WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  获取支付参数配置
 */
+ (void)getPayParamsWithPay_id:(NSInteger)pay_id
                     completed:(void (^)(QYGPreparamModel *prePaymentModel))completed
            WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  生成支付交易单号
 */
+ (void)postPaymentWithCoin_id:(NSInteger)coin_id
                  completed:(void (^)(QYGPaymentModel *paymentModel))completed
         WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 微信登录
 */
+ (void)getWechatUserInfoWithCode:(NSString *)code
                        completed:(void (^)(QYGUserInfoModel *userInfo))completed
               WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 娃娃币充值列表
 */
+ (void)getCoinsListCompleted:(void (^)(NSArray *coinListArr))completed
           WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 娃娃币流水记录
 */
+ (void)getCoinRecordsWithPage:(NSInteger)page
                      per_page:(NSInteger)per_page
                     Completed:(void (^)(NSArray *coinRecordArr))completed
            WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 娃娃币总充值数量
 */
+ (void)getCoinTotalPaymentsCompleted:(void (^)(NSInteger totalCoin))completed
                   WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 娃娃币充值记录
 */
+ (void)getCoinPaymentsWithPage:(NSInteger)page
                       per_page:(NSInteger)per_page
                      Completed:(void (^)(NSArray *coinRecordArr))completed
             WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 退出登录
 */
+ (void)getLoginOutCompleted:(void (^)(BOOL isSuccess))completed
          WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 用户信息
 */
+ (void)getUserInfoCompleted:(void (^)(QYGUserInfoModel *userInfo))completed
                WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 我的娃娃记录
 */
+ (void)getMineDollRecordsWithPage:(NSInteger)page
                          per_page:(NSInteger)per_page
                         Completed:(void (^)(NSArray *dollRecordArr))completed
                WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 首页轮播图
 */
+ (void)getBannersCompleted:(void (^)(NSArray *bannerArr))completed
           WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 我的游戏记录列表
 */
+ (void)getMineGameRecordWithPage:(NSInteger)page
                     per_page:(NSInteger)per_page
               operate_result:(NSInteger)operate_result
                    Completed:(void (^)(NSArray *mineGameArr))completed
           WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
#pragma mark - 操作界面

/*
 * 娃娃机抓取记录
 */
+ (void)getGameRecordWithDeviceId:(NSInteger)deviceId
                             page:(NSInteger)page
                         per_page:(NSInteger)per_page
                        Completed:(void (^)(NSArray *gameRecordArr))completed
               WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 游戏操作
 */
+ (void)getGameOperateWithDevice_id:(NSInteger)device_id
                             action:(NSInteger)action
                          Completed:(void (^)(BOOL isSuccess))completed
             WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 * 游戏结果
 */
+ (void)getGameResultWithDevice_id:(NSInteger)device_id
                    completed:(void (^)(QYGGameResultModel *gameResultModel))completed
           WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;

/*
*  开始游戏
*/
+ (void)postGameWithDevice_id:(NSInteger)device_id
                                   completed:(void (^)(QYGGameMessageModel *gameModel))completed
                          WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;

/*
 *  娃娃机详情
 */
+ (void)getDrollMachineItemDataWithDevice_id:(NSInteger)device_id
                              completed:(void (^)(QYGMachineItemModel *machineItemModel))completed
                     WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  娃娃机列表
 */
+ (void)getDrollListDataWithPage:(NSInteger)page
                          per_page:(NSInteger)per_page
                         completed:(void (^)(NSArray *noticeEntityArr))completed
                WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;
/*
 *  首页娃娃抓中列表
 */
+ (void)getNoticeListDataCompleted:(void (^)(NSArray *noticeArr))completed
              WithErrorCodeBlock:(ErrorCodeBlock)errorCodeBlock;

@end
